package a.g;

import a.f.g.e;
import a.h.dc;
import a.j.ke;

public class v
  extends h
{
  private static final String q = "ACTIVATE_DETERMINISTIC_MODE";
  private static final String r = "ACTIVATE_TREE_BEAUTIFIER";
  private static final String s = "MODE";
  private static final String t = "MAXIMAL_DURATION";
  private static final String u = "ITERATION_FACTOR";
  private static final String v = "OBEY_NODE_SIZES";
  private static final String w = "GRAVITY_FACTOR";
  private static final String x = "SPHERE_OF_ACTION";
  private static final String y = "INITIAL_PLACEMENT";
  private static final String z = "PREFERRED_EDGE_LENGTH";
  private static final String A = "VISUAL";
  private static final String B = "ALGORITHM";
  private static final String C = "ORGANIC";
  private static final String D = "ONLY_SELECTION";
  private static final String E = "MAINLY_SELECTION";
  private static final String F = "ALL";
  private static final String G = "AS_IS";
  private static final String H = "RANDOM";
  private static final String I = "AT_ORIGIN";
  private static final String J = "EDGE_LENGTH_DEVIATION";
  private static final String K = "REPULSION";
  private static final String L = "ATTRACTION";
  private static final String M = "GROUPING";
  private static final String N = "GROUP_LAYOUT_POLICY";
  private static final String O = "IGNORE_GROUPS";
  private static final String P = "LAYOUT_GROUPS";
  private static final String Q = "FIX_GROUPS";
  private static final String R = "GROUP_NODE_COMPACTNESS";
  private static final String[] S = { "RANDOM", "AT_ORIGIN", "AS_IS" };
  private static final String[] T = { "ALL", "MAINLY_SELECTION", "ONLY_SELECTION" };
  private e U;
  public static int V;
  
  public v()
  {
    super("ORGANIC", "yFiles Layout Team", "Wrapper for OrganicLayouter");
  }
  
  protected dc j()
  {
    if ((f.p != 0) || (this.U == null)) {
      z();
    }
    dc localdc = new dc(a());
    localdc.l("VISUAL");
    localdc.a("SPHERE_OF_ACTION", T, this.U.B());
    localdc.a("INITIAL_PLACEMENT", S, this.U.C());
    localdc.a("PREFERRED_EDGE_LENGTH", this.U.G(), 0, 500);
    localdc.a("OBEY_NODE_SIZES", this.U.H());
    localdc.a("ATTRACTION", this.U.s(), 0, 2);
    localdc.a("REPULSION", this.U.a(), 0, 2);
    localdc.a("GRAVITY_FACTOR", this.U.A(), -0.2D, 2.0D, 1);
    localdc.a("ACTIVATE_TREE_BEAUTIFIER", this.U.z());
    localdc.l("ALGORITHM");
    localdc.a("ITERATION_FACTOR", this.U.F());
    localdc.a("MAXIMAL_DURATION", (int)(this.U.D() / 1000L));
    localdc.a("ACTIVATE_DETERMINISTIC_MODE", this.U.y());
    localdc.l("GROUPING");
    String[] arrayOfString = { "LAYOUT_GROUPS", "FIX_GROUPS", "IGNORE_GROUPS" };
    localdc.a("GROUP_LAYOUT_POLICY", arrayOfString, 0);
    localdc.a("GROUP_NODE_COMPACTNESS", this.U.u(), 0.0D, 1.0D);
    return localdc;
  }
  
  protected void m()
  {
    z();
    dc localdc = i();
    this.U.c(localdc.c("VISUAL", "PREFERRED_EDGE_LENGTH"));
    this.U.a(1000 * localdc.c("ALGORITHM", "MAXIMAL_DURATION"));
    this.U.d(dc.a(S, localdc.f("VISUAL", "INITIAL_PLACEMENT")));
    this.U.c(dc.a(T, localdc.f("VISUAL", "SPHERE_OF_ACTION")));
    this.U.d(localdc.d("VISUAL", "GRAVITY_FACTOR"));
    this.U.j(localdc.e("VISUAL", "OBEY_NODE_SIZES"));
    this.U.e(localdc.d("ALGORITHM", "ITERATION_FACTOR"));
    this.U.i(localdc.e("VISUAL", "ACTIVATE_TREE_BEAUTIFIER"));
    this.U.h(localdc.e("ALGORITHM", "ACTIVATE_DETERMINISTIC_MODE"));
    this.U.b(localdc.c("VISUAL", "ATTRACTION"));
    this.U.a(2 - localdc.c("VISUAL", "REPULSION"));
    this.U.a(localdc.d("GROUPING", "GROUP_NODE_COMPACTNESS"));
  }
  
  protected void n()
  {
    int i = f.p;
    boolean bool = f.o;
    try
    {
      e().a(e.w, ke.c(e()));
      dc localdc = i();
      if (i == 0)
      {
        if (j.d(e()))
        {
          if (i == 0) {
            if (localdc.h("GROUPING", "GROUP_LAYOUT_POLICY").equals("FIX_GROUPS"))
            {
              this.U.b((byte)1);
              if (i != 0) {
                return;
              }
              if (!bool) {
                break label130;
              }
            }
          }
          if (i == 0)
          {
            if (localdc.h("GROUPING", "GROUP_LAYOUT_POLICY").equals("IGNORE_GROUPS"))
            {
              this.U.b((byte)2);
              if (i != 0) {
                return;
              }
            }
          }
          else {
            if (!bool) {
              break label130;
            }
          }
          this.U.b((byte)0);
        }
        label130:
        a(this.U);
      }
    }
    finally
    {
      e().j(e.w);
    }
  }
  
  protected void o()
  {
    this.U = null;
  }
  
  private void z()
  {
    if ((f.p != 0) || (this.U == null)) {
      this.U = new e();
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.g.v

 * JD-Core Version:    0.7.0.1

 */